package com.agile.leetcode.designmodel.observer;

/**
 * 测试
 *
 * @Author KD
 * @Date 2021/1/11 15:48
 */
public class Client {
    public static void main(String[] args) {
        Observer observer1 = new ConcreateObserver1("观察者1");
        Observer observer2 = new ConcreateObserver2("观察者2");
        Subject subject = new ConcreateSubject();
        subject.attach(observer1);
        subject.attach(observer2);
        subject.notify("改变了");
    }
}
